package com.wjw.cloud.admin;

import org.junit.jupiter.api.Test;

import java.lang.reflect.Method;

public class AnnotationT {

    @Test
    void t2() throws NoSuchMethodException {

        Class<AnnotationT> clazz = AnnotationT.class;
        Method show = clazz.getMethod("t");
        TestAnnotation[] annotationsByType = show.getAnnotationsByType(TestAnnotation.class);

        for (TestAnnotation testAnnotation : annotationsByType) {
            System.out.println(testAnnotation.value());
        }

    }

    @TestAnnotation("hello")
    @TestAnnotation("world")
    public void t() {

    }

}
